from PIL import Image

logo = Image.open('logo.png')
ms = Image.open('maishu.jpeg')

#动态计算logo的坐标：多减去5，给logo留下点空隙
x = ms.width - logo.width - 5
y = ms.height - logo.height - 5
ms.paste(logo, (x, y))
ms.save('maishu5.jpeg')
